DIFF3
Section: User Commands (1)
Updated: 24 January 1991
Index
Return to Main Contents
NAME
diff3 - GNU diff3, display line-by-line differences between 3 files,
including binary files
SYNOPSIS
diff
[
options
]
filename1
filename2
filename3
WARNING
This manual page is updated only occasionally, because the GNU
project does not use nroff.
DESCRIPTION
This version of diff3 has all of BSD diff3's features, with the following
additional features.
An input file may end in a non-newline character. With the
-m
option, an incomplete last line stays incomplete. Other output
styles treat incomplete lines like diff.
The file name '-' denotes the standard input. It can appear at most
once.
OPTIONS
GNU diff3 has the following additional options:
- -a
-
Always treat files as text and compare them line-by-line, even if
they do not appear to be text.
- -i
-
Include 'w' and 'q' commands at the end of the output, to write out
the changed file, thus emulating System V behavior. One of the edit
script options
-e,
-E,
-x,
-X,
-3
must also be specified.
- -m
-
Apply the edit script to the first file and send the result to
standard output. Unlike piping diff3's output to
ed(1),
this works even for binary files and incomplete lines.
-E
is assumed if no edit script option is specified. This option is
incompatible with
-i.
- -L label
-
Use the specified
label
for lines output by the
-E
and
-X
options, one of which must also be specified. This option may be
given zero, one, or two times; the first label marks <<<<<<< lines
and the second marks >>>>>>> lines. The default labels are the names
of the first and third files on the command line. Thus `diff3 -L X
-L Z -E A B C' acts like `diff3 -E A B C', except that the output
looks like it came from files named X and Z rather than from files
named A and C.
DIAGNOSTICS
Exit status 0 means success, 1 means overlaps were found and
-E
or
-X
was specified, and 2 means trouble.
SEE ALSO
diff(1),
ed(1)
Index
- NAME
-
- SYNOPSIS
-
- WARNING
-
- DESCRIPTION
-
- OPTIONS
-
- DIAGNOSTICS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 08:54:27 GMT, February 14, 2025